home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
psion
/
viewpica.lha
/
VIEWPIC.ASC
< prev
next >
Wrap
Text File
|
1994-10-03
|
1KB
|
78 lines
' FILESELECT "Choose Pic-File...","View","xh1:psion/pic/",file$
file$=_dosCmd$
IF EXIST(file$)=FALSE AND file$<>""
STOP
ENDIF
OPEN "i",#1,file$
SEEK #1,6 !nr of bitmaps
bm%=INP(1)
grey!=FALSE
IF bm%=2
grey!=TRUE
ENDIF
SEEK #1,10 !width..
a1%=INP(1)
a2%=INP(1)
w&=a2%*256+a1%
a1%=INP(1)
a2%=INP(1)
h&=a2%*256+a1%
a1%=INP(1)
a2%=INP(1)
si&=a2%*256+a1%
OPENW #1,10,10,w&+24,h&+25,512+8,14
ON MESSAGE GOSUB cleanup
a1%=INSTR(file$,":")
IF a1%>0
file$=MID$(file$,a1%+1,LEN(file$)-a1%)
ENDIF
a1%=RINSTR(file$,"/")
IF a1%>0
file$=MID$(file$,a1%+1,LEN(file$)-a1%)
ENDIF
TITLEW #1,STR$(w&)+"*"+STR$(h&)+"*"+STR$(bm%)+" "+file$
SEEK #1,8+12*bm% !bitmap..
IF grey!=TRUE
SEEK #1,8+12*bm%+si&
ENDIF
DEFFILL 2,1,0
PBOX 10,20,9+w&,19+h&
GRAPHMODE 0
IF INT(w&/8+0.999)/2<>INT(INT(w&/8+0.999)/2)
ri!=TRUE
ELSE
ri!=FALSE
ENDIF
FOR g%=1 TO 2
IF g%=2 OR grey!=FALSE
COLOR 1
ELSE
COLOR 0
ENDIF
FOR y%=20 TO h&+19
FOR x%=1 TO w& STEP 8
DEFLINE INP(1)*2^8
LINE 16+x%,y%,8+x%,y%
NEXT x%
IF ri!=TRUE
b%=INP(1)
ENDIF
NEXT y%
IF grey!=FALSE
g%=3
ELSE
SEEK #1,8+12*bm%
ENDIF
NEXT g%
DO
SLEEP
LOOP
END
PROCEDURE cleanup
IF MENU(1)=512
CLOSE #1
CLOSEW #1
STOP
ENDIF
RETURN